package roborally.model;

import be.kuleuven.cs.som.annotate.*;

/**
 * A class for dealing with terminatable objects.
 * 
 * @version	1.0
 * @author  Pieter Robberechts	(1e Bach Informatica)
 * @author	Jeroen Sanders		(1e Bach Informatica)
 *
 */
public abstract class Terminatable {

	/**
	 * Terminate this terminatable object.
	 *
	 * @post	This object is terminated.
	 *       	| new.isTerminated()
	 */
	public void terminate() {
		this.isTerminated = true;
	}
	
	/**
	 * Check whether this terminatable object is terminated.
	 */
	@Basic @Raw
	public boolean isTerminated() {
		return this.isTerminated;
	}
	
	/**
	 * Variable registering whether or not this terminatable object is
	 * terminated.
	 */
	private boolean isTerminated = false;
}
